<template>
	<!-- 我的店铺 -->
	<view class="personalstores_wp">
		<view class="p_bg"></view>
		<view class="p_body">
			<view class="p_shop" @click="$navTo('/pages/shoplist/shopgoods?id='+info.uid)"> 
				<image :src="info.logo" mode="" ></image>
				<view style="color:#6600fb;" v-if="info.paymode==1">让利折扣店</view><!-- {{uid}}{{info.uid }} -->
				<view style="color:#8405dc;" v-if="info.paymode==0">预存充值店</view><!-- {{uid}}{{info.uid }} -->
				<view class="p_s_title">{{info.supname}}</view>
				<view class="p_s_title">店铺ID: {{info.uid}}</view><!-- {{uid}}{{info.uid }} -->
				<!-- <view class="p_set" @click="$navTo('../business/template')">店铺设置</view> -->
			</view>
			<view class="p_list">
				<!-- @click="$navTo('../business/merch?uid='+info.uid)" -->
				<view class="p_item" @click="Popup">
					<view>基本信息</view>
					<view style="color: red;">(需审核)</view>
				</view>
				<view v-if="info.paymode==1" class="p_item" @click="$navTo('/pages/business/accountdis?uid='+info.uid)">
					<view>店铺折扣设置</view>
				</view>
				<view class="p_item" @click="$navTo('/pages/business/notice?uid='+info.uid)">
					<view>公告、</view>
					<view>轮播图</view>
				</view>
				<view class="p_item" @click="$navTo('/pages/groupmenu/addlabel?uid='+info.uid)">
					<view>提示标签</view>
				</view>

				<view class="p_item" @click="$navTo('/pages/business/shopclass?uid='+info.uid)">
					<view>商品</view>
					<view>分类</view>
				</view>
				<view class="p_item" @click="$navTo('/pages/business/shoplist?uid='+info.uid)">
					<view>商品</view>
					<view>设置</view>
				</view>
				<view class="p_item" @click="$navTo('/pages/business/shoplistw?uid='+info.uid)">
					<view>团购</view>
					<view>商品</view>
				</view>
				<view class="p_item" @click="$navTo('/pages/groupmenu/shoppersonnel?uid='+info.uid)">
					<view>添加</view>
					<view>店员</view>
				</view>
				<view class="p_item" @click="$navTo('/pages/business/equipment?uid='+info.uid)">
					<view>音响</view>
					<view>绑定</view>
				</view>
<!-- 				<view class="p_item" @click="$navTo('/pages/groupmenu/joingroup')">
					<view>连锁店</view>
					<view>管理</view>
				</view> -->

				<view class="p_item" @click="$navTo('/pages/business/myset?uid='+info.uid)">
					<view>自动核销设置</view>
				</view>


			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				active: 1,
				info: {},
				orderinfo: {},
				times: 0,
				paymode: '',
				uid: '',
			}
		},
		onLoad(option) {
			this.info.uid = option.uid;
			this.getInfo();


		},
		methods: {
			Popup() {  // 临时提醒
				uni.showModal({
					title: '特别提示 ',
					content: '如[入驻行业][区县][门头照][营业执照][身份证]发生修改，则需要人工审核，审核期间需临时闭店，请谨慎选择是否继续？',
					cancelText: "取消", // 取消按钮的文字  
					confirmText: "确认", // 确认按钮的文字  
					showCancel: false, // 是否显示取消按钮，默认为 true 显示
					confirmColor: '#f55850', 
					cancelColor: '#39B54A',
					success: (res) => {
					if(res.confirm) { 
										//点击确定之后执行的代码
						uni.navigateTo({
						    url:"../business/merch?uid="+ this.info.uid
						})

					} else {  
						console.log('cancel') //点击取消之后执行的代码
						}  
					} 
				})
			},
			getInfo() {
				this.$axios('info/main', 'POST', 'supplier', {
					uid: this.info.uid
				}).then(res => {
					if (res.data.code == 200) {
						this.info = res.data.data;

					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f2f2f2;
		color: $font-color-dark;
		padding-bottom: 130upx;
	}

	.p_bg {
		background: $base-color;
		position: absolute;
		top: 0;
		width: 100%;
		height: 180upx;
	}

	.p_body {
		padding: 30upx 20upx;
		position: relative;
		z-index: 10;
	}

	.p_shop {
		background: #fff;
		border-radius: 20upx;
		padding: 60upx 20upx;
		text-align: center;
		width: 100%;
		position: relative;
	}

	.p_shop image {
		border-radius: 10upx;
		height: 150upx;
		width: 150upx;
	}

	.p_s_title {
		font-weight: bold;
		padding-top: 20upx;
	}

	.p_set {
		color: #0062CC;
		position: absolute;
		top: 30upx;
		right: 40upx;
	}

	.p_list {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		padding-top: 30upx;
	}

	.p_item {
		background-color: #fff;
		border-radius: 10upx;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-wrap: wrap;
		margin-bottom: 30upx;
		width: 345upx;
		padding: 60upx 20upx;
	}

	.p_item_num {
		text-align: center;
		width: 100%;
		font-size: 40upx;
	}
</style>